perm filename FRAC.TEX[TEX,DEK]1 blob sn#782199 filedate 1985-01-19 generic text, type T, neo UTF8
\centerline{\bf Recipes and Fractions}
\smallskip
\centerline{\sl by Donald E. Knuth}
\medskip
\noindent
Pages 233, 236, and 237 of {\sl The \TeX book\/} contain examples of
alignment based on excerpts from the well-known book {\sl Mastering
the Art of French Cooking}, by Julia Child et al. Several of the
measurements in those examples involve fractions like `$1\over2$',
and this caused unpleasant interference between adjacent lines
when I first looked at proofs of the tables for pages 236--237. The
fractions on different lines didn't actually touch each other, but they
came close enough to be visually disturbing.  That's why I increased the
distance between baselines by 2\thinspace pt in those examples.

\def\frac#1/#2{\leavevmode\kern.1em
  \raise.5ex\hbox{\the\scriptfont0 #1}\kern-.1em
  /\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}}

Since writing {\sl The \TeX book\/} I've had several opportunities to
typeset recipes for various social occasions, and I learned something that
I should have realized long ago:  The typographer's `\frac1/2' works
better than a mathematician's `$1\over2$' in such texts. Hence I recently
added a new exercise 11.6 to {\sl The \TeX book}, explaining how to make
fractions like `\frac1/2' when they aren't already present in a font;
I~also changed the examples on pages 233, 236, and 237 so that they would
use this idea.  (See the current errata list for details.)

Last December, my wife and I made a keepsake for the Associates
of the Stanford University Libraries: My grandmother's recipe
for ``Stollen'' was used to bake some of the goodies at their
annual Christmas Tea, and we provided copies of the recipe as an
example of digital typography. I was glad to find that the members
of this group were pleased not only by the delicious cake; they
also liked the quality of the typesetting, even though it was
done by a computer! If I hadn't used an appropriate style of
fractions, I'm sure we wouldn't have gotten such a favorable
response.

Here is a copy of the keepsake, and the \TeX\ code that produced it,
in case the reader is interested in seeing another small but
complete example of \TeX\ usage (based only on the plain \TeX\ macros).
The final output was printed in such a way that we could easily fold
the two pages, making essentially a $3''\times5''$ card that could
be filed with other recipes. Since the recipe is so short, I didn't
use any fancy macros to do the double-column formatting of the
list of ingredients.

{\newcount\n \n=1
  \output{\global\setbox\n=\box255 \global\advance\n by 2}
  \eject
  \let\end=\relax
  \input stollen
  \unvbox1}

\def\verbatim#1{\begingroup \frenchspacing
	\def\do##1{\catcode`##1=12 } \dospecials
	\parskip 0pt \parindent 0pt
	\catcode`\ =\active \catcode`\↑↑M=\active
	\tt \def\par{\ \endgraf} \obeylines \obeyspaces
	\input #1 \endgroup}

\medbreak
\verbatim{stollen}

\vfill\eject

$$\hbox{\vrule\vbox{\hrule
  \hbox to 5in{\hss\lower.35in\vbox to 3in{}\box3\hss}
  \hrule
  \hbox to 5in{\hss\lower.35in\vbox to 3in{}\box5\hss}
  \hrule}\vrule}$$

\bye